package com.duobaoyu.dby.supply.db.entity.refund;

import com.baomidou.mybatisplus.annotation.*;
import com.duobaoyu.dby.common.mybatis.base.BaseEntity;
import com.duobaoyu.dby.supply.db.handler.CustomerReturnAddressTypeHandler;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.math.BigDecimal;


/**
 * 售后申请信息表
 *
 * @author LY
 * @email 249007302@qq.com
 * @date 2023-09-26 10:42:54
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = true)
@TableName(value = "scb_after_sale",autoResultMap = true)
public class AfterSale extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 描述：渠道编码
     */
    @ApiModelProperty(value = "渠道编码")
    private String channelCode;
    /**
     * 描述：订单编码
     */
    @ApiModelProperty(value = "订单编码")
    private String orderSn;
    /**
     * 业务来源
     */
    @ApiModelProperty(value = "业务来源")
    private String showServerName;
    /**
     * 描述：售后状态
     */
    @ApiModelProperty(value = "售后状态")
    private Integer status;
    /**
     * 描述：售后渠道交易单号
     */
    @ApiModelProperty(value = "售后渠道交易单号")
    private String afterSaleTradeOrderSn;
    /**
     * 描述：售后单号
     */
    @ApiModelProperty(value = "售后单号")
    private String afterSaleSn;
    /**
     * 描述：客户寄回地址
     */
    @ApiModelProperty(value = "客户寄回地址")
    @TableField(typeHandler = CustomerReturnAddressTypeHandler.class)
    private CustomerReturnAddress customerReturnAddress;
    /**
     * 描述：渠道父编号
     */
    @ApiModelProperty(value = "渠道父编号")
    private String channelOrderParentSn;
    /**
     * 描述：申请退款金额
     */
    @ApiModelProperty(value = "申请退款金额")
    private BigDecimal applyRefundAmount;
    /**
     * 描述：渠道售后单号
     */
    @ApiModelProperty(value = "渠道售后单号")
    private String channelAfterSaleSn;
    /**
     * 描述：售后来源 1 用户申请 2 运营申请 3 系统自动生成
     * //@see AfterSaleSourceEnum
     */
    @ApiModelProperty(value = "售后来源 1 用户申请 2 运营申请 3 系统自动生成")
    private Integer afterSaleSource;
    /**
     * 描述：运费申请退款金额
     */
    @ApiModelProperty(value = "运费申请退款金额")
    private BigDecimal freightApplyRefundAmount;
    /**
     * 描述：渠道运费退款金额
     */
    @ApiModelProperty(value = "渠道运费退款金额")
    private BigDecimal channelFreightActualRefundAmount;
    /**
     * 描述：失败原因
     */
    @ApiModelProperty(value = "失败原因")
    private String failReason;
    /**
     * 取消原因
     */
    @ApiModelProperty(value = "取消原因")
    private String cancelReason;
    /**
     * 调用来源
     */
    @ApiModelProperty(value = "调用来源")
    private String serverName;
    /**
     * 描述：订单渠道交易单号-和订单统一
     */
    @ApiModelProperty(value = "订单渠道交易单号-和订单统一")
    private String channelTradeOrderSn;
    /**
     * 供应链三方交易单号
     */
    @ApiModelProperty(value = "供应链三方交易单号")
    private String orderTradeSn;
    /**
     * 描述：售后类型
     */
    @ApiModelProperty(value = "售后类型")
    private Integer afterSaleType;
    /**
     * 描述：申请退款金额
     */
    @ApiModelProperty(value = "申请退款金额")
    private BigDecimal channelActualRefundAmount;
    /**
     * 描述：是否有发票
     */
    @ApiModelProperty(value = "是否有发票")
    private Boolean hasInvoice;
    /**
     * 描述：业务售后单号
     */
    @ApiModelProperty(value = "业务售后单号")
    private String bizAfterSaleSn;
    /**
     * 描述：渠道订单编号
     */
    @ApiModelProperty(value = "渠道订单编号")
    private String channelOrderSn;
    /**
     * 联系人
     */
    @ApiModelProperty(value = "联系人")
    private String contactInfo;
    /**
     * 退款状态
     */
    @ApiModelProperty(value = "退款状态")
    private Integer refundStatus;
    /**
     * 商户id
     */
    @ApiModelProperty(value = "商户id")
    private String mchId;
    /**
     * 用户id
     */
    @ApiModelProperty(value = "用户id")
    private String userId;
    /**
     * 版本号-用作乐观锁
     */
    @Version
    @ApiModelProperty(value = "版本号-用作乐观锁")
    private Integer version;
    /**
     * 是否删除 0-否 1-是
     */
    @TableLogic(value = "0",delval = "1")
    @ApiModelProperty(value = "是否删除 0-否 1-是")
    private Integer delFlag;
}
